package com.lw.yygh.model.order;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * Order
 * </p>
 *
 * @author qy
 */
@Data
@TableName("order_info")
public class OrderInfo {
	
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.AUTO)
	private Long id;

	//userId
	@TableField("user_id")
	private Long userId;

	//订单交易号
	@TableField("out_trade_no")
	private String outTradeNo;

	//医院编号
	@TableField("hoscode")
	private String hoscode;

	//医院名称
	@TableField("hosname")
	private String hosname;

	//科室编号
	@TableField("depcode")
	private String depcode;

	//科室名称
	@TableField("depname")
	private String depname;

	//排班id
	@TableField("schedule_id")
	private String scheduleId;

	//医生职称
	@TableField("title")
	private String title;

	//安排日期
	@JsonFormat(pattern = "yyyy-MM-dd")
	@TableField("reserve_date")
	private Date reserveDate;

	//安排时间（0：上午 1：下午）
	@TableField("reserve_time")
	private Integer reserveTime;

	//就诊人id
	@TableField("patient_id")
	private Long patientId;

	//就诊人名称
	@TableField("patient_name")
	private String patientName;

	//就诊人手机
	@TableField("patient_phone")
	private String patientPhone;

	//预约记录唯一标识（医院预约记录主键）
	@TableField("hos_record_id")
	private String hosRecordId;

	//预约号序
	@TableField("number")
	private Integer number;

	//建议取号时间
	@TableField("fetch_time")
	private String fetchTime;

	//取号地点
	@TableField("fetch_address")
	private String fetchAddress;

	//医事服务费
	@TableField("amount")
	private BigDecimal amount;

	//退号时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@TableField("quit_time")
	private Date quitTime;

	//订单状态
	@TableField("order_status")
	private Integer orderStatus;

	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	@TableField(fill = FieldFill.INSERT_UPDATE)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	private Integer isDeleted;

	@TableField(exist = false)
	private Map<String,Object> param=new HashMap<>();
}

